With a few exceptions.
GError *error;
gint ret;
GObject *obj;
- gchar *objects[2] = {"mainbox", NULL};
- gchar *objects2[3] = {"mainbox", "window2", NULL};
+ const gchar *objects[2] = {"mainbox", NULL};
+ const gchar *objects2[3] = {"mainbox", "window2", NULL};
const gchar buffer[] =
"<interface>"
" <object class=\"GtkWindow\" id=\"window\">"
}
static void
-test_template ()
+test_template (void)
{
MyGtkGrid *my_gtk_grid;
#include <gtk/gtk.h>
-static char *icon_names[] = {
+static const char *icon_names[] = {
/*** Icons used in code or templates, sorted alphabetically ***/
"audio-volume-high",
"audio-volume-high-symbolic",
test_cargs += ['-DHAVE_UNIX_PRINT_WIDGETS']
endif
+foreach flag: common_cflags
+ if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden']
+ test_cargs += flag
+ endif
+endforeach
+
foreach t : tests
test_name = t.get(0)
test_srcs = ['@0@.c'.format(test_name)] + t.get(1, [])
GtkTreeRBNode *node,
gint expected_dirtyness)
{
+ g_assert (node);
+
if (expected_dirtyness)
{
g_assert (GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_COLUMN_INVALID) ||
/* mime type is mandatory */
recent_data->mime_type = NULL;
- recent_data->app_name = "testrecentchooser";
- recent_data->app_exec = "testrecentchooser %u";
+ recent_data->app_name = (char *)"testrecentchooser";
+ recent_data->app_exec = (char *)"testrecentchooser %u";
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
res = gtk_recent_manager_add_full (manager,
g_test_trap_assert_failed ();
/* app name is mandatory */
- recent_data->mime_type = "text/plain";
+ recent_data->mime_type = (char *)"text/plain";
recent_data->app_name = NULL;
- recent_data->app_exec = "testrecentchooser %u";
+ recent_data->app_exec = (char *)"testrecentchooser %u";
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
res = gtk_recent_manager_add_full (manager,
g_test_trap_assert_failed ();
/* app exec is mandatory */
- recent_data->mime_type = "text/plain";
- recent_data->app_name = "testrecentchooser";
+ recent_data->mime_type = (char *)"text/plain";
+ recent_data->app_name = (char *)"testrecentchooser";
recent_data->app_exec = NULL;
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
{
G_GNUC_END_IGNORE_DEPRECATIONS;
- recent_data->mime_type = "text/plain";
- recent_data->app_name = "testrecentchooser";
- recent_data->app_exec = "testrecentchooser %u";
+ recent_data->mime_type = (char *)"text/plain";
+ recent_data->app_name = (char *)"testrecentchooser";
+ recent_data->app_exec = (char *)"testrecentchooser %u";
res = gtk_recent_manager_add_full (manager,
uri,
recent_data);
{
char *new_uri;
- data->mime_type = "text/plain";
- data->app_name = "testrecentchooser";
- data->app_exec = "testrecentchooser %u";
+ data->mime_type = (char *)"text/plain";
+ data->app_name = (char *)"testrecentchooser";
+ data->app_exec = (char *)"testrecentchooser %u";
if (g_test_verbose ())
g_print (G_STRLOC ": adding item %d\n", i);
g_assert (error == NULL);
recent_data = g_slice_new0 (GtkRecentData);
- recent_data->mime_type = "text/plain";
- recent_data->app_name = "testrecentchooser";
- recent_data->app_exec = "testrecentchooser %u";
+ recent_data->mime_type = (char *)"text/plain";
+ recent_data->app_name = (char *)"testrecentchooser";
+ recent_data->app_exec = (char *)"testrecentchooser %u";
gtk_recent_manager_add_full (manager, uri, recent_data);
g_slice_free (GtkRecentData, recent_data);
static void
-slide_right_animations ()
+slide_right_animations (void)
{
keep_size (KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT, TRUE);
}
static void
-slide_right_no_animations ()
+slide_right_no_animations (void)
{
keep_size (KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT, FALSE);
}
static void
-slide_left_animations ()
+slide_left_animations (void)
{
keep_size (KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT, TRUE);
}
static void
-slide_left_no_animations ()
+slide_left_no_animations (void)
{
keep_size (KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT, FALSE);
}
static void
-none_animations ()
+none_animations (void)
{
keep_size (KEEP_WIDTH | KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_NONE, TRUE);
}
static void
-none_no_animations ()
+none_no_animations (void)
{
keep_size (KEEP_WIDTH | KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_NONE, FALSE);
}
static void
-crossfade_animations()
+crossfade_animations (void)
{
keep_size (KEEP_WIDTH | KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE, TRUE);
}
static void
-crossfade_no_animations ()
+crossfade_no_animations (void)
{
keep_size (KEEP_WIDTH | KEEP_HEIGHT, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE, FALSE);
}
static void
-slide_down_animations ()
+slide_down_animations (void)
{
keep_size (KEEP_WIDTH, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN, TRUE);
}
static void
-slide_down_no_animations ()
+slide_down_no_animations (void)
{
keep_size (KEEP_WIDTH, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN, FALSE);
}
static void
-slide_up_animations ()
+slide_up_animations (void)
{
keep_size (KEEP_WIDTH, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP, TRUE);
}
static void
-slide_up_no_animations ()
+slide_up_no_animations (void)
{
keep_size (KEEP_WIDTH, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP, FALSE);
}
#include <gtk/gtk.h>
static void
-test_empty_search ()
+test_empty_search (void)
{
GtkTextBuffer *buffer;
GtkTextIter it, s, e;
case ROWS_REORDERED:
return "rows-reordered";
+ case LAST_SIGNAL:
default:
- /* Fall through */
- break;
+ g_assert_not_reached ();
}
return "(unknown)";
#include <gtk/gtk.h>
-void register_list_store_tests ();
-void register_tree_store_tests ();
-void register_sort_model_tests ();
-void register_filter_model_tests ();
-void register_model_ref_count_tests ();
+void register_list_store_tests (void);
+void register_tree_store_tests (void);
+void register_sort_model_tests (void);
+void register_filter_model_tests (void);
+void register_model_ref_count_tests (void);
/*
* Signal monitor